<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>日常安排</title>
    <link rel="stylesheet" href="/css/font.css">
    <link rel="stylesheet" href="/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
</head>
<body>
<table class="layui-table">
    <thead>
    <th>编号</th>
    <th>客户名</th>
    <th>性别</th>
    <th>生日</th>
    <th>邮箱</th>
    <th>操作</th>
    </thead>
    <tbody>
    <tr th:each="i:${info.list}">
        <td th:text ="${i.userId}"></td>
        <td th:text ="${i.userName}"></td>
        <td th:text ="${i.userSex}"></td>
        <td th:text ="${i.userBir}"></td>
        <td th:text ="${i.userEmail}"></td>
        <td>
            <button class="layui-btn layui-btn-normal" type="button" onclick="sendEmail(this)">发送邮件</button>
        </td>
    </tr>
    </tbody>
</table>
<div style="position:absolute;left: 30%">
    <a class="layui-btn layui-btn-normal" th:href="@{/dailyEvent(page=${info.pre})}">上一页</a>
    <a class="layui-btn layui-btn-normal" th:href="@{/dailyEvent(page=${info.next})}">下一页</a>
    共有<span th:text="${info.total}"></span>条数据
    共有<span th:text="${info.totalPage}"></span>页
    当前第<span th:text="${info.cur}"></span>页
</div>
</body>
</html>
<script>
    //打开发送邮件页面
    function sendEmail(obj) {
        //获取当前选中行的userId值
        var id=$(obj).parent().parent().find("td").eq(0).text();
        //打开修改弹窗
        x_admin_show("发送邮件","/manager/sendEmailPage?userId="+id,1000,700);
    }
</script>